<!--  -->
<template>
  <div>
    <template>
      <el-table :data="arr" height="730" border style="width: 100%">
        <el-table-column prop="number" label="序号" width="50" type='index'> </el-table-column>

        <el-table-column prop="state" label="订单状态"  width="70">
            <template slot-scope="scope">
              <span style="color:#33D299">{{ state[scope.row.state] }}</span>
            </template>
        </el-table-column>
        <el-table-column prop="type" label="订单类型" width="70"> 
           <template slot-scope="scope">
              <span style="color:#6D75E9">{{scope.row.type }}</span>
            </template>
        </el-table-column>
        <el-table-column prop="orderNum" label="订单编号"> </el-table-column>
        <el-table-column prop="name" label="姓名"> </el-table-column>
        <el-table-column prop="department" label="科室"> </el-table-column>
        <el-table-column prop="docter" label="接诊医生"> </el-table-column>
        <el-table-column prop="discount" label="优惠(元)" width="60"> </el-table-column>
        <el-table-column prop="receive" label="应收/退(元)" width="60"> </el-table-column>
        <el-table-column prop="trueRec" label="实收/退(元)" width="60"> </el-table-column>
        <el-table-column prop="yb" label="医保(元)" width="60"> </el-table-column>
        <el-table-column prop="vipcard" label="会员卡(元)" width="60"> </el-table-column>
        <el-table-column prop="cash" label="现金(元)" width="60"> </el-table-column>
        <el-table-column prop="zfb" label="支付宝(元)" width="60"> </el-table-column>
        <el-table-column prop="wx" label="微信(元)" width="60"> </el-table-column>
        <el-table-column prop="card" label="银行卡(元)" width="60"> </el-table-column>
        <el-table-column prop="date" label="收费日期"> </el-table-column>
        <el-table-column prop="tollCollector" label="收费员"> </el-table-column>
        <el-table-column prop="option" label="操作">
          <template slot-scope="scope">
            <el-link type="primary" @click="opendialog(scope.row)">查看详情</el-link>
          </template>
        </el-table-column>
      </el-table>
    </template>
  </div>
</template>

<script>
import bus from '../../../utils/eventBus.js';
export default {
  props:["arr"],
  data() {
    return {
      state:["未收费","已收费"],
    };
  },
  methods:{
    opendialog(row){
      bus.$emit("openStaticDialog",row);
    }
  }
};
</script>
<style lang="less" scoped>
/deep/.cell {
  text-align: center;
}
// 头部
/deep/.has-gutter{
  color:#060606;
  th,tr{background-color: #EAEBFF !important;}
}
// 改变每个单元格的border颜色
/deep/.el-table__cell{
  border:1px solid #EAEBFF;
} 
</style>